	{include file="Public:header" /}
		<div class="bar bar-nav">
			<h1 class="title">讨论列表</h1>
			<i class="icon icon-left" onclick="window.history.go(-1);"></i>
		</div>
		<nav class="bar discuss_nav bar-tab">
				<input class="js-bm" readonly="readonly" type="text" placeholder="我要讨论.." />
		</nav>

		<div class="content">
			<div class="row discuss no-border" style="margin-top:0;">
				<div class="col-100">
					<div class="content-padded">
						<div class="list-block media-list" style="margin-top:0;">
							<ul>
                                                            {foreach name="comment" item="comment" key="cc"}
								<li class="item-content">
									<div class="item-media">
										<img src="{$comment['headimgurl']}">
									</div>
									<div class="item-inner">
										<div class="item-title-row">
											<div class="item-title">{$comment['user_name']}<span class="pull-right">{$comment['add_time']|date='Y-m-d',###}</span></div>
										</div>
										<div class="item-subtitle">{$comment['content']}</div>
									</div>
								</li>
                                                            {/foreach}
								
							</ul>
						</div>
					</div>
				</div>
			</div>
						<div class="discuss_bot">-没有更多的评论了-</div>
			
			
			
			<div class="activity_from_bg" style="display: none;"></div>
			<div class="activity_from discuss_from" style="display: none;">
				
				<form>
					<div class="list-block">
					<span class="discuss_from_btn" id='submit'>确定</span>
					<span class="discuss_from_btn discuss_from_btn2 js-bm">取消</span>
						<div class="item-title text-center">我要讨论</div>
    <ul>
      <!-- Text inputs -->
      <li>
        <div class="item-content">
          <div class="item-inner">
            <div class="item-input">
                <form id='submitForm' onsubmit="return false;">
            	<textarea class="js_discuss_bottom_text" placeholder="我要评论..."></textarea>
                </form>
            </div>
          </div>
        </div>
      </li>
    </ul>
  </div>
  <div class="content-block">
    <div class="row">
    </div>
  </div>
				</form>
			</div>
</div>

{include file="Public:footer" /}

<script>
    $('#submit').click(function(){
        $.ajax({
            url:"{:U('Apply/discuss_list')}",
            dataType: 'json',
            type:'post',
            data:{content:$('.js_discuss_bottom_text').val(),id:'{$id}'},
            success:function(data){
                console.log(data);
                if(data.status == 1){
                     Zepto.confirm(data.message,'提示',function(){
                          window.location.href="{:U('Apply/discuss_list',array('id'=>$id))}";
                     });
			 return false;
                }else if(data.status == 2){
                     Zepto.toast(data.message, 2000, 'success top');
			 return false;
                }
            }
        });
    });
</script>